package game.tycoon.sosial;

import android.app.Activity;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.RelativeLayout;

public class SplashScreen extends Activity {
	
	RelativeLayout bg;
	AnimationDrawable splashAnim;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.splash_layout);
		this.castItem();
	}
	private void castItem(){
		bg = (RelativeLayout)findViewById(R.id.splash);
		splashAnim = (AnimationDrawable)bg.getBackground();
	}
	public void onWindowFocusChanged (boolean hasFocus){
    	splashAnim.start();
    }
}
